package com.yc.jiushujie.jsj_index.web;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yc.common.bean.Result;
import com.yc.jiushujie.entity.JsjBook;
import com.yc.jiushujie.entity.JsjUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.SessionAttribute;

import java.util.List;
import java.util.Map;

@FeignClient("jsj-user")
public interface IUserAction {
    @GetMapping("/jiushujie/jsjUser/queryNew")
    List<JsjUser>  queryNew();//查最近登录的
    @GetMapping("/jiushujie/jsjUser/queryLastlogin")
    List<JsjUser>  queryLastlogin();//查最后登录的
    @GetMapping("/jiushujie/jsjUser/queryHotshudian")
    List<JsjUser>   queryHotshudian();//查热门书店
    @GetMapping("/jiushujie/jsjUser/queryHotuser")
    List<JsjUser>  queryHotuser();//查热门个人
    @GetMapping("/jiushujie/jsjUser/getownerbooks")
    JsjUser getownerbooks(@RequestParam String account);//查用户拥有的所有书
    @PostMapping("jiushujie/jsjUser/register")
    public Result register(@RequestParam JsjUser jsjUser);

    @PostMapping("jiushujie/jsjUser/saveHead")
    Result saveHead(@RequestParam String head,
                   @SessionAttribute Map<String,Object> loginedUser);

}
